<div class="widgets">


  <div class="row">
    <ba-card cardTitle="爬虫列表" baCardClass="with-scroll " class="smart-table-container">
      <div class="horizontal-scroll">
        <table class="table mytable" >
          <tr>
            <th  width="33%"   >序号</th>
            <th  width="33%"    >爬虫名</th>
            <th  width="33%"    >开始爬虫</th>
          </tr>

          <tr *ngFor="let crawler of crawlers">
            <td>{{crawler.id}}</td>
            <td>{{crawler.spiderName}}</td>
            <td><button type="button" class="btn btn-success" (click)="onStartClick(crawler)">启动爬虫</button></td>
          </tr>
        </table>
      </div>
    </ba-card>
  </div>


  <div class="row">
    <ba-card cardTitle="任务列表" baCardClass="with-scroll " class="smart-table-container">
      <div class="horizontal-scroll">
        <table class="table mytable" >
          <tr>
            <th    >序号</th>
            <th     >任务序号</th>
            <th     >运行状态</th>
            <th     >开始时间</th>
            <th     >结束时间</th>
            <th     >爬虫名</th>
            <th      >漏洞总量</th>
            <th       >进度</th>
            <th       >停止爬虫</th>
            <th       >删除爬虫</th>
          </tr>

          <tr *ngFor="let job of jobs">
            <td>{{job.id}}</td>
            <td>{{job.jobId}}</td>
            <td>{{job.status}}</td>
            <td>{{job.startTime}}</td>
            <td>{{job.endTime}}</td>
            <td>{{job.spiderName}}</td>
            <td>{{job.total}}</td>
            <td><p>{{job.current}}%<ngb-progressbar  type="info" [value]="job.current"></ngb-progressbar></p></td>
            <td><button  type="button" class="btn btn-warning" [disabled]="job.disabledButton" (click)="Cancel(job)">停止爬虫</button></td>
            <td><button type="button" class="btn btn-danger" (click)="Delete(job)">删除爬虫</button></td>

          </tr>
        </table>
      </div>
    </ba-card>
  </div>

</div>
